package com.heima.user.feign;

import com.heima.common.dto.ResponseResult;
import com.heima.user.entity.WmUser;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-media")
public interface MediaClient {
    /**
     * 创建自媒体账号
     *
     * @param user
     * @return
     */
    @PostMapping("/api/v1/user")
    public ResponseResult<WmUser> saveWmUser(@RequestBody WmUser user);
    /**
     * 更新
     * @param user
     * @return
     */
    @PutMapping("/api/v1/user")
    @ApiOperation(value = "跟新自媒体",notes = "author:mcm")
    @ApiModelProperty(name = "user",value = "请求对象",required = true,dataType = "WmUser")
    public ResponseResult updateWmUser(@RequestBody WmUser user);
}
